
package com.qdu.servlet;

import com.qdu.entity.PublicActivity;
import com.qdu.service.PublicActivityService;
import com.qdu.service.impl.PublicActivityServiceImpl;
import java.io.IOException;
import javax.servlet.ServletException;
import javax.servlet.annotation.WebServlet;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

/**
 *
 * @author 24959
 */
@WebServlet("/gpais")
public class GetPublicActivityInfoServlet extends HttpServlet{
    PublicActivityService p=new PublicActivityServiceImpl();

    @Override
    protected void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {
        req.setCharacterEncoding("utf-8");
        int Pno = Integer.parseInt(req.getParameter("Pno"));
        PublicActivity pa = p.findActivityById(Pno);
        req.setAttribute("pa", pa);
        req.getRequestDispatcher("/publicactivity_info.jsp").forward(req, resp);
    }
    
}